<%@ page contentType="text/html; charset=UTF-8" language="java" %>
<%@ include file="/parameter.jsp" %>
<html>
<head>
	<title>后台管理</title>
	<%@ include file="/admin/adminParam.jsp" %>

</head>
<body>
	<div class="statusBar">
		<input type="button" value="添加新用户" onClick="document.location='adminAction.do?method=UserManagerAddPre'" />
	</div>

	<table class="list">
		<tr>
			<th>账号名</th>
			<th>昵称</th>
			<th>电子邮箱</th>
			<th>性别</th>
			<th>生日</th>
			<th>注册时间</th>
			<th>用户级别</th>
			<th>操 作</th>
		</tr>
		<c:forEach items="${userlist}" var="user" varStatus="status">
		<tr>
			<td>${user.username}</td>
			<td>${user.nickname}</td>
			<td>${user.email}</td>
			<td>${user.sex}</td>
			<td>${user.birthyear}-${user.birthmonth}-${user.birthday}</td>
			<td>${user.registertime}</td>
			<td><c:choose><c:when test="${user.usergrade == '0'}">管理员</c:when><c:when test="${user.usergrade == '1'}">版主</c:when><c:otherwise>普通人员</c:otherwise></c:choose></td>
			<td style="text-align: center">
				<a href="adminAction.do?method=UserManagerModifyPre&id=${user.id}">[编辑]</a>
				<a href="adminAction.do?method=UserManagerDeleteDo&id=${user.id}" onClick="return checkDelete();">[删除]</a>
			</td>
		</tr>
        
		</c:forEach>
	</table>
	
	<tools:page pagerName="adminAction.do" pagerSum="${pagerSum}" pagerSize="${pagerSize}"/>
</body>
</html>